import { fromJS } from "immutable";
const TabbarReducer = (
  prevState = fromJS({
    show: true,
  }),
  action
) => {
  //   let newState = { ...prevState }; fromJS 后prevState做任何的修改返回的都是一个全新的对象
  switch (action.type) {
    case "kerwinhide-tabbar":
      // newState.show = false;
      return prevState.set("show", false);
    case "kerwinshow-tabbar":
      // newState.show = true;
      return prevState.set("show", true);
    default:
      return prevState;
  }
};
export default TabbarReducer;
